//
//  growthLeftTViCell.m
//  SKaURobot
//
//  Created by cdong on 16/3/1.
//  Copyright © 2016年 cdong. All rights reserved.
//

#import "growthLeftTViCell.h"

@implementation growthLeftTViCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setCell];
    }
    return self;
}

- (void)setCell{
    self.fill1V = [[UIView alloc] initWithFrame:CGRectMake(28*matchW, 0, 1*matchW, 32*matchH)];
    self.fill1V.backgroundColor = [RGBColorEncapsulation colorWithRGB:0xe8e8e8 alpha:1];
    [self.contentView addSubview:self.fill1V];
    
    self.imageV1 = [[UIImageView alloc]initWithFrame:CGRectMake(21.5*matchW, CGRectGetMaxY(self.fill1V.frame), 13*matchW, 13*matchW)];
    self.imageV1.image = [UIImage imageNamed:@"point_red"];
    [self.contentView addSubview:self.imageV1];
    
    self.fill2V = [[UIView alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.fill1V.frame), CGRectGetMaxY(self.imageV1.frame), CGRectGetWidth(self.fill1V.frame), 169*matchH)];
    self.fill2V.backgroundColor = [RGBColorEncapsulation colorWithRGB:0xe8e8e8 alpha:1];
    [self.contentView addSubview:self.fill2V];
}

//- (UIImageView *)imageV1{
//    if (_imageV1 == nil) {
//        _imageV1 = [[UIImageView alloc]initWithFrame:CGRectMake(21.5*matchW, CGRectGetMaxY(_fill1V.frame), 13*matchW, 13*matchW)];
////        _imageV1.image = [UIImage imageNamed:@"point_red"];
//        [self.contentView addSubview:_imageV1];
//    }
//    return _imageV1;
//}

//- (UIView *)fill2V{
//    if (_fill2V == nil) {
//        _fill2V = [[UIView alloc] initWithFrame:CGRectMake(CGRectGetMinX(_fill1V.frame), CGRectGetMaxY(_imageV1.frame), CGRectGetWidth(_fill1V.frame), 169*matchH)];
//        _fill1V.backgroundColor = [RGBColorEncapsulation colorWithRGB:0xe8e8e8 alpha:1];
//        [self.contentView addSubview:_fill2V];
//    }
//    return _fill2V;
//}

- (UIImageView *)photoV{
    if(_photoV == nil){
        _photoV = [[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_fill1V.frame) + 28*matchW, CGRectGetMinY(_imageV1.frame), 266*matchW, 150*matchH)];
        _photoV.image = [UIImage imageNamed:@"wifi"];
        [self.contentView addSubview:_photoV];
    }
    return _photoV;
}

//- (UILabel *)dataL{
//    if (_dataL == nil) {
//        _dataL = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMinX(_photoV.frame), CGRectGetMaxY(_photoV.frame) + 20*matchH, CGRectGetWidth(_photoV.frame), 12*matchH)];
//        _dataL.textColor = [RGBColorEncapsulation colorWithRGB:0x9f9ea1 alpha:1];
//        _dataL.font = [UIFont systemFontOfSize:12];
//        [self.contentView addSubview:_dataL];
//    }
//    return _dataL;
//}


- (UILabel *)timeL{
    if (_timeL == nil) {
        _timeL = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMinX(_photoV.frame), CGRectGetMaxY(_photoV.frame) + 20*matchH, CGRectGetWidth(_photoV.frame), 12*matchH)];
        _timeL.textColor = [RGBColorEncapsulation colorWithRGB:0x9f9ea1 alpha:1];
        _timeL.text = @"123456789";
        _timeL.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_timeL];
    }
    return _timeL;
}

@end
